package com.mit.service.purchase.dao;

import java.util.List;

import com.mit.common.exception.NoRecordUpdateException;
import com.mit.common.purchase.dto.MaterialDTO;

public interface IMaterialDAO {

	List<MaterialDTO> retrieveMaterials(Integer supplier, String activeIndicator);
	MaterialDTO createMaterial(MaterialDTO to);
	MaterialDTO updateMaterial(MaterialDTO to) throws NoRecordUpdateException;
	MaterialDTO retrieveMaterial(Integer id);
	/**
	 * Is the material already exist?
	 * @param supplier - Mandatory
	 * @param code - Nullable
	 * @param name - Mandatory
	 * @param excludedId - Nullable
	 * @return
	 */
	boolean hasMaterial(Integer supplier, String code, String name, Integer excludedId);
}
